package com.agp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@ApiModel("古树")
public class TreeQueryVO {
    @ApiModelProperty(value = "古树id", example = "123456",position = 1)
    private Integer treeId;

    @NotNull(message = "古树中文名不能为空")
    @ApiModelProperty(value = "古树中文名", example = "黄帝手植柏",position = 2)
    private String chineseName;

    @ApiModelProperty(value = "拉丁学名", example = "Pinus radiata",position = 3)
    private String scientificName;

    @NotNull(message = "古树科名不能为空")
    @ApiModelProperty(value = "科名", example = " 柏科Cupressaceae）",position = 4)
    private String familyName;

    @NotNull(message = "古树属名不能为空")
    @ApiModelProperty(value = "属名", example = "侧柏属Platycladus",position = 4)
    private String genusName;


    @Range(min = 0, message = "树龄必须大于0")
    @ApiModelProperty(value = "树龄", example = "100",position = 5)
    private Short estimatedAge;

    @ApiModelProperty(value = "经度", example = "120.123456",position = 7)
    private Double gpsLongitude;

    @ApiModelProperty(value = "纬度", example = "30.123456",position = 8)
    private Double gpsLatitude;

    @NotNull(message = "详细地址不能为空")
    @ApiModelProperty(value = "详细地址", example = "云南省昆明市昆明理工大学计算机重点实验室旁",position = 9)
    private String locationAddress;
    @ApiModelProperty(value = "更新时间", example = "2025-04-01 00:00:00",position = 10)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @ApiModelProperty(value = "创建时间", example = "2025-04-01 00:00:00",position = 10)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
